package util.generic;

import java.util.List;


/**
 * @author Jorge Diaz
 * Redocumentado Ramon De La Cruz
 */
public class TestGenericUtil {
    
    
    public static void test() {
        
        /*
        try {
            Method method = Prueba.class.getMethod("getStringList", null);            
            Type returnType = method.getGenericReturnType();
            
            //List<Prueba> lista = new ArrayList<Prueba>();
            //lista.getClass().getTypeParameters()[0].getClass().getGenericSuperclass()
            
            if(returnType instanceof ParameterizedType){
                ParameterizedType type = (ParameterizedType) returnType;
                Type[] typeArguments = type.getActualTypeArguments();
                for(Type typeArgument : typeArguments){
                    Class typeArgClass = (Class) typeArgument;
                    System.out.println("typeArgClass = " + typeArgClass);
                }
            }
        } catch (NoSuchMethodException ex) {
            Logger.getLogger(TestGenericUtil.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SecurityException ex) {
            Logger.getLogger(TestGenericUtil.class.getName()).log(Level.SEVERE, null, ex);
        }
                */
    }
	
    private class Prueba {
        public List<Prueba> getStringList(){
            return null;
        }
    }
}